<?php
/**
 * 教学实践模型
 * @author LXf
 * @date 2018.8.24
 */

namespace App\Model\Crm;

use App\model\BaseModel;
use DB;

class TeachPracticeModel extends BaseModel{
     /***
     *教学实践列表 
     ***/
  const TEACH_PRACTICE = 'teach_practice';

  public static function listPractice($orderby="id"){
        
        return DB::table(self::TEACH_PRACTICE)->orderBy($orderby)->get();

    }
    /***
     *添加教学实践 
     ***/
    public static function addPractice($data){
        
        return DB::table(self::TEACH_PRACTICE)->insert($data);

    }
     /***
     *修改教学实践 
     ***/
    public static function updatePractice($where,$data){
        
        return DB::table(self::TEACH_PRACTICE)->where($where)->update($data);

    }
    public static function delPractice($where){
       return DB::table(self::TEACH_PRACTICE)->where($where)->delete();
    }

}